﻿
Imports System.ComponentModel.DataAnnotations.Schema
Imports System.ComponentModel.DataAnnotations

<Table("Recibo")>
Public Class Recibo
    Implements  IEntity

    <Key()>
    <DatabaseGenerated(DatabaseGeneratedOption.Identity)>
    Public Property IdRecibo() As Integer

    Public Property IdCliente() As Integer

    <ForeignKey("IdCliente")>
    Public Overridable Property Cliente() As Cliente

    Public Property Fecha() As DateTime

    Public Property NumeroRecibo() As Integer

    Public Property Importe() As Decimal

    Public Property Anulado() As Boolean

    <StringLength(200)>
    Public Property Observaciones() As String


    Public Property IdContrato() As Integer

    <ForeignKey("IdContrato")>
    Public Overridable Property Contrato() As Contrato

    Public Property IdFormaPago() As Integer

    <ForeignKey("IdFormaPago")>
    Public Overridable Property FormaPago() As FormaPago

    <NotMapped()>
    Public Property ID() As Integer Implements IEntity.ID
        Get
            Return IdRecibo
        End Get
        Set(ByVal value As Integer)
            IdRecibo = value
        End Set
    End Property
End Class
